//vue异步组件和webpack的【代码分块点】功能结合，实现了按需加载
import App from '../App'

//首页
const index = () => import(/* webpackChunkName:'index'*/"../page/index/index");
const workDetail = () => import(/* webpackChunkName:'workDetail'*/"../page/work/detail/workDetail");
const interview = () => import(/* webpackChunkName:'interview'*/"../page/work/interview/interview");
const collectWork = () => import(/* webpackChunkName:'collectWork'*/"../page/work/collect/collectWork");
const contactUs = () => import(/* webpackChunkName:'contactUs'*/"../page/contact/contactUs");
const introduce = () => import(/* webpackChunkName:'introduce'*/"../page/introduce/introduce");
const aboutUs = () => import(/* webpackChunkName:'aboutUs'*/"../page/about/us/aboutUs");
const news = () => import(/* webpackChunkName:'aboutUs'*/"../page/about/news/news");
const newsDetail = () => import(/* webpackChunkName:'newsDetail'*/"../page/about/news/newsDetail");
const login = () => import(/* webpackChunkName:'login'*/"../page/user/login");
const register = () => import(/* webpackChunkName:'register'*/"../page/user/register");
const forgetPwd = () => import(/* webpackChunkName:'forgetPwd'*/"../page/user/forgetPwd");
const modifyPwd = () => import(/* webpackChunkName:'modifyPwd'*/"../page/user/modifyPwd");
const modifyPwdSuccess = () => import(/* webpackChunkName:'modifyPwdSuccess'*/"../page/user/modifyPwdSuccess");

export default [{
  path: '/',
  component: App, //顶层路由，对应index.html
  children: [ //二级路由，对应App.vue
    {
      path: "",
      redirect: "/index",
      meta: {
        title: '蓝聘,专注蓝领人士的求职服务！'
      }
    },
    {
      path: '/index',
      component: index,
      meta: {
        title: '蓝聘,专注蓝领人士的求职服务！'
      }
    },
    {
      path: '/workDetail',
      component: workDetail,
      meta: {
        title: '招聘详情'
      }
    },
    {
      path: '/interview',
      component: interview,
      meta: {
        title: '面试预约'
      }
    },
    {
      path: '/collectWork',
      component: collectWork,
      meta: {
        title: '收藏企业'
      }
    },
    {
      path: '/contactUs',
      component: contactUs,
      meta: {
        title: '联系我们'
      }
    },
    {
      path: '/introduce',
      component: introduce,
      meta: {
        title: 'APP介绍'
      }
    },
    {
      path: '/aboutUs',
      component: aboutUs,
      meta: {
        title: '关于我们'
      }
    },
    {
      path: '/news',
      component: news,
      meta: {
        title: '新闻列表'
      }
    },
    {
      path: '/newsDetail',
      component: newsDetail,
      meta: {
        title: '新闻详情'
      }
    },
    {
      path: '/login',
      component: login,
      meta: {
        title: '登录'
      }
    },
    {
      path: '/register',
      component: register,
      meta: {
        title: '注册'
      }
    },
    {
      path: '/forgetPwd',
      component: forgetPwd,
      meta: {
        title: '忘记密码'
      }
    },
    {
      path: '/modifyPwd',
      component: modifyPwd,
      meta: {
        title: '修改密码'
      }
    },
    {
      path: '/modify-pwd-success',
      component: modifyPwdSuccess,
      meta: {
        title: '修改密码'
      }
    },
  ]
}]



